package com.weixin.paleituo.adapter;

/**
 * Author yichao
 * Time  2017/12/12 15:57
 * Dest  热门店铺
 */

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.weixin.paleituo.R;
import com.weixin.paleituo.bean.WordOfMouthStoreBean;
import com.weixin.paleituo.util.UIUtils;

import java.util.List;

public class HotStoreHorizontalScrollViewAdapter extends AbHorizontalScrollViewAdapter<WordOfMouthStoreBean>
{



    public HotStoreHorizontalScrollViewAdapter(Context context, List<WordOfMouthStoreBean> strings)
    {
        super(context, strings);

    }

    public View getView(final int position, View convertView, ViewGroup parent)
    {
        ViewHolder viewHolder = null;
        if (convertView == null)
        {
            viewHolder = new ViewHolder();
            convertView = mInflater.inflate(
                    R.layout.item_hot_store, parent, false);
            viewHolder.mImg = (ImageView) convertView
                    .findViewById(R.id.iv_hot_store);
            convertView.setTag(viewHolder);
        } else
        {
            viewHolder = (ViewHolder) convertView.getTag();
        }

       // Glide.with(mContext).load(mTS.get(position).getImg()).into(viewHolder.mImg);
        UIUtils.loadImageView(mContext,mTS.get(position).getImg(),viewHolder.mImg);


        return convertView;
    }

    private class ViewHolder
    {
        ImageView mImg;


    }

}

